/*
 * Created by JFormDesigner on Tue Apr 22 17:16:12 CST 2025
 */

package com.hafu.view;

import com.hafu.view.GYS.addGysFrm;
import com.hafu.view.GYS.manageGysFrm;
import com.hafu.view.GYS.addGysFrm;
import com.hafu.view.RuKu.AddRuKuFrm;
import com.hafu.view.RuKu.QueryRuKuFrm;
import com.hafu.view.ShangPin.AddShangPinFrm;
import com.hafu.view.ShangPin.ManageShangPinFrm;
import com.hafu.view.kehu.AddKeHuFrm;
import com.hafu.view.kehu.ManageKeHuFrm;
import com.hafu.view.kucun.KuCunFrm;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.GroupLayout;
import com.hafu.view.GYS.addGysFrm;
import com.hafu.view.GYS.manageGysFrm;
import com.hafu.view.RuKu.AddRuKuFrm;
import com.hafu.view.RuKu.QueryRuKuFrm;
import com.hafu.view.ShangPin.AddShangPinFrm;
import com.hafu.view.ShangPin.ManageShangPinFrm;
import com.hafu.view.kehu.AddKeHuFrm;
import com.hafu.view.kehu.ManageKeHuFrm;
import java.awt.Color;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.util.HashSet;
import java.util.Set;
import javax.swing.GroupLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JSeparator;
import javax.swing.GroupLayout.Alignment;
import javax.swing.LayoutStyle.ComponentPlacement;

public class MainFrm extends JFrame {
    private static Set<JFrame> openFrames = new HashSet();

    private JSeparator separator1;
    private JSeparator separator2;
    private JSeparator separator3;
    private JSeparator separator4;
    private JSeparator separator5;
    private JLabel label1;
    private JLabel label2;
    private JLabel label3;
    private JLabel label4;
    private JLabel label5;
    private JLabel label6;
    private JLabel label7;

    public MainFrm() {
        this.initComponents();
    }

    private void button1(ActionEvent e) {
        KuCunFrm kuCunFrm = new KuCunFrm();
        kuCunFrm.setVisible(true);
    }

    private void button2(ActionEvent e) {
        addGysFrm addGYSFrm = new addGysFrm();
        addGYSFrm.setVisible(true);
    }

    private void button3(ActionEvent e) {
        manageGysFrm manageGYSFrm = new manageGysFrm();
        manageGYSFrm.setVisible(true);
    }

    private void button4(ActionEvent e) {
        AddKeHuFrm addKeHuFrm = new AddKeHuFrm();
        addKeHuFrm.setVisible(true);
    }

    private void button5(ActionEvent e) {
        ManageKeHuFrm manageKeHuFrm = new ManageKeHuFrm();
        manageKeHuFrm.setVisible(true);
    }

    private void button6(ActionEvent e) {
        AddShangPinFrm addShangPinFrm = new AddShangPinFrm();
        addShangPinFrm.setVisible(true);
    }

    private void button7(ActionEvent e) {
        ManageShangPinFrm manageShangPinFrm = new ManageShangPinFrm();
        manageShangPinFrm.setVisible(true);
    }

    private void button8(ActionEvent e) {
        AddRuKuFrm addRuKuFrm = new AddRuKuFrm();
        addRuKuFrm.setVisible(true);
    }

    private void button9(ActionEvent e) {
        QueryRuKuFrm queryRuKuFrm = new QueryRuKuFrm();
        queryRuKuFrm.setVisible(true);
    }

    private void thisWindowClosing(WindowEvent e) {
        if (this.isVisible()) {
            System.exit(0);
        }

    }
    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents  @formatter:off
        // Generated using JFormDesigner Evaluation license - aaaa
        button1 = new JButton();
        button2 = new JButton();
        button3 = new JButton();
        button4 = new JButton();
        button5 = new JButton();
        button6 = new JButton();
        button7 = new JButton();
        button8 = new JButton();
        button9 = new JButton();

        //======== this ========
        setTitle("\u4e3b\u754c\u9762");
        var contentPane = getContentPane();

        //---- button1 ----
        button1.setText("\u67e5\u770b\u603b\u4f53");
        button1.addActionListener(e -> button1(e));

        //---- button2 ----
        button2.setText("\u6dfb\u52a0\u8001\u5e08\u4fe1\u606f");
        button2.addActionListener(e -> button2(e));

        //---- button3 ----
        button3.setText("\u8001\u5e08\u4fe1\u606f\u7ba1\u7406");
        button3.addActionListener(e -> button3(e));

        //---- button4 ----
        button4.setText("\u6dfb\u52a0\u5b66\u751f\u4fe1\u606f");
        button4.addActionListener(e -> button4(e));

        //---- button5 ----
        button5.setText("\u5b66\u751f\u4fe1\u606f\u7ba1\u7406");
        button5.addActionListener(e -> button5(e));

        //---- button6 ----
        button6.setText("\u6dfb\u52a0\u8bfe\u7a0b\u4fe1\u606f");
        button6.addActionListener(e -> button6(e));

        //---- button7 ----
        button7.setText("\u8bfe\u7a0b\u4fe1\u606f\u7ba1\u7406");
        button7.addActionListener(e -> button7(e));

        //---- button8 ----
        button8.setText("\u6dfb\u52a0\u8ba2\u5355\u4fe1\u606f");
        button8.addActionListener(e -> button8(e));

        //---- button9 ----
        button9.setText("\u67e5\u770b\u8ba2\u5355\u4fe1\u606f");
        button9.addActionListener(e -> button9(e));

        GroupLayout contentPaneLayout = new GroupLayout(contentPane);
        contentPane.setLayout(contentPaneLayout);
        contentPaneLayout.setHorizontalGroup(
            contentPaneLayout.createParallelGroup()
                .addGroup(contentPaneLayout.createSequentialGroup()
                    .addGap(53, 53, 53)
                    .addGroup(contentPaneLayout.createParallelGroup()
                        .addComponent(button9)
                        .addComponent(button8)
                        .addComponent(button1)
                        .addGroup(contentPaneLayout.createSequentialGroup()
                            .addGroup(contentPaneLayout.createParallelGroup()
                                .addComponent(button2)
                                .addComponent(button4)
                                .addComponent(button6))
                            .addGap(84, 84, 84)
                            .addGroup(contentPaneLayout.createParallelGroup()
                                .addComponent(button7)
                                .addComponent(button5)
                                .addComponent(button3))))
                    .addContainerGap(434, Short.MAX_VALUE))
        );
        contentPaneLayout.setVerticalGroup(
            contentPaneLayout.createParallelGroup()
                .addGroup(contentPaneLayout.createSequentialGroup()
                    .addGap(60, 60, 60)
                    .addComponent(button1)
                    .addGap(34, 34, 34)
                    .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                        .addComponent(button2)
                        .addComponent(button3))
                    .addGap(40, 40, 40)
                    .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                        .addComponent(button4)
                        .addComponent(button5))
                    .addGap(47, 47, 47)
                    .addGroup(contentPaneLayout.createParallelGroup()
                        .addComponent(button6)
                        .addComponent(button7))
                    .addGap(45, 45, 45)
                    .addComponent(button8)
                    .addGap(55, 55, 55)
                    .addComponent(button9)
                    .addContainerGap(99, Short.MAX_VALUE))
        );
        pack();
        setLocationRelativeTo(getOwner());
        // JFormDesigner - End of component initialization  //GEN-END:initComponents  @formatter:on
    }





    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables  @formatter:off
    // Generated using JFormDesigner Evaluation license - aaaa
    private JButton button1;
    private JButton button2;
    private JButton button3;
    private JButton button4;
    private JButton button5;
    private JButton button6;
    private JButton button7;
    private JButton button8;
    private JButton button9;
    // JFormDesigner - End of variables declaration  //GEN-END:variables  @formatter:on
}
